var mySwiper = new Swiper('.swiper', {
    autoplay: true,
    effect: 'fade',
    loop: true, // 循环模式选项

    // 如果需要分页器
    pagination: {
        el: '.swiper-pagination',
        clickable: true,
    },
})
for (i = 0; i < mySwiper.pagination.bullets.length; i++) {
    mySwiper.pagination.bullets[i].onmouseover = function () {
        this.click();
    };
}


//如果你在swiper初始化后才决定使用clickable，可以这样设置
mySwiper.params.pagination.clickable = true;
//此外还需要重新初始化pagination
mySwiper.pagination.destroy()
mySwiper.pagination.init()
mySwiper.pagination.bullets.eq(0).addClass('swiper-pagination-bullet-active');

var waypoint = new Waypoint({
    element: document.getElementById('slide'),
    handler: function (direction) {
        console.log(direction);
        if (direction == 'down') {
            $('.header').css('height', '0px')
        } else {
            $('.header').css('height', '1.52rem')
        }

    }
});
$(function () {
    $('#back').click(function () {
        window.scrollTo({
            top: 0,
            behavior: 'smooth',
        });
    });
    Echo.init({
        offset: 0,
        throttle: 0
    });
})
